package cn.edu.sdjzu.xg.eagle.Service;

import cn.edu.sdjzu.xg.eagle.entity.User;
import cn.edu.sdjzu.xg.eagle.exception.BaseException;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;

public interface UserDaoService {

    //find()方法
    User findUser(Long id) throws SQLException , BaseException;

    //findAll()方法
    Collection<User> findAllUsers() throws SQLException , BaseException;

    //add()方法
    boolean addUser(User user, Connection connection) throws SQLException , BaseException;

    //delete()方法
    boolean deleteUser(Long id,Connection connection) throws SQLException , BaseException;

    void login(Connection connection, User user) throws SQLException, BaseException;
    /**
     * 其他功能待完善
     */
}
